package org.groupg.practice;

import java.util.Random;

//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    public static void main(String[] args) {

        // 某地区 房价是面积的100倍左右，那么我们给出一个面积预测出房价
        PreBody preBody = new PreBody();
        for (int i = 0; i < 50; i++) {
            test(preBody);
        }
    }

    public static void test(PreBody preBody){
        Random rand = new Random();
        for (int i = 1; i < 3; i++) {
            double s = i * 10;
            double much = s * 100 + rand.nextInt(10);
            double y = preBody.insertParameter(much);
            double error = much - y;
            System.out.println("实际与预测的误差："+error);
            preBody.backError(much);
        }
    }
}